<!DOCTYPE html>
<html style="height: 100%">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta charset="utf-8">
</head>
<body style="height: 100%; margin: 0">
    <div id="container" style="height: 100%"></div>
    <script type="text/javascript" src="./echarts.min.js"></script>
    <script type="text/javascript" src="./dark.js"></script>
    <script type="text/javascript">
        var dom = document.getElementById("container");
        var myChart = echarts.init(dom, 'dark');
        var app = {};
        function loadECharts(id, echartJson){
            var option = JSON.parse(echartJson);
            if (option && typeof option === "object") {
                myChart.setOption(option, true);

                var ecConfig = echarts.config;
                function eConsole(param) {
                    console.log(param);
                    WebAppInterface.chartClickListener(id, param.value,
                        param.name, param.seriesName);
                }
                myChart.on("click", eConsole);
            }
        }
    </script>
</body>
</html>